package PlotPourri.GUI;

import java.awt.Component;
import java.text.DecimalFormat;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.table.DefaultTableCellRenderer;

public class PeriodColumnRenderer extends DefaultTableCellRenderer {

    @Override
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
        setHorizontalAlignment(SwingConstants.RIGHT);
        return super.getTableCellRendererComponent(table, (new DecimalFormat("#0.00000")).format(value), isSelected, hasFocus, row, column);
    }
}
